#include <pthread.h>
#include <stdio.h>

void *thfunc(void *arg)
{
    char *str;
    str = (char *)arg;
    printf("in thfunc:str=%s\n", str);
    return (void *)0;
}

int main()
{
    pthread_t tid;
    int ret;
    const char *str = "hello world";
    pthread_create(&tid, NULL, thfunc, (void *)str);
    pthread_join(tid, NULL);
    printf("in mian thread is created\n");
    return 0;
}